package com.bourne.model;

import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;

import com.bourne.annotation.LambdaParam;
import com.bourne.request.DictRequest;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 
 * </p>
 *
 * @author denny
 * @since 2023-03-10
 */
@TableName("base_dict")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class BaseDictDO extends BaseCoreDO implements Serializable {

    /**
     * 字典key名称
     */
    @LambdaParam(value = "name")
    private String name;

    /**
     * 字典key编码
     */
    @LambdaParam(value = "code")
    private String code;

    /**
     * 有效状态：0无效， 1有效
     */
    private Integer state;

    /**
     * 删除状态
     */
    private Integer deleted;

    /**
     * 乐观锁版本
     */
    private Integer version;

    public BaseDictDO(DictRequest dictRequest) {
        this.name = dictRequest.getName();
        this.code = dictRequest.getCode();
        this.state = 0;
        this.deleted = 0;
    }
}
